function chineseCount(word){
    var length=0;
    for(var cc=0;cc<word.length;cc++){
       var c = word.charCodeAt(cc);
      if (!(c>=32&&c<=126)) length++;
    }
    return length;
}

function isAllNum(str){
	for(var i=0;i<str.length;i++){
		var c = str.charCodeAt(i);
		if(c > 57 || c < 48)
			return false;
	}
	return true;
}

function pwdStrongCheck(passwd) {
intScore = 0;
if (passwd.match(/[a-z]/)) // [verified] at least one lower case letter
{
intScore = (intScore+1)
} if (passwd.match(/[A-Z]/)) // [verified] at least one upper case letter
{
intScore = (intScore+5)
} // NUMBERS
if (passwd.match(/\d+/)) // [verified] at least one number
{
intScore = (intScore+5)
} if (passwd.match(/(\d.*\d.*\d)/)) // [verified] at least three numbers
{
intScore = (intScore+5)
} // SPECIAL CHAR
if (passwd.match(/[!,@#$%^&*?_~]/)) // [verified] at least one special character
{
intScore = (intScore+5)
} if (passwd.match(/([!,@#$%^&*?_~].*[!,@#$%^&*?_~])/)) // [verified] at least two special characters
{
intScore = (intScore+5)
} // COMBOS
if (passwd.match(/[a-z]/) && passwd.match(/[A-Z]/)) // [verified] both upper and lower case
{
intScore = (intScore+2)
} if (passwd.match(/\d/) && passwd.match(/\D/)) // [verified] both letters and numbers
{
intScore = (intScore+2)
} // [Verified] Upper Letters, Lower Letters, numbers and special characters
if (passwd.match(/[a-z]/) && passwd.match(/[A-Z]/) && passwd.match(/\d/) && passwd.match(/[!,@#$%^&*?_~]/))
{
intScore = (intScore+2)
}
var imgName = 0;
if(intScore < 11){
	imgName = 1;
}else if(intScore < 18){
	imgName = 2;
}else{
	imgName = 3;
}
if(passwd.length==0||intScore==0){
	$("#pwdHint").attr('class','txt-gy');
	$("#pwdHint").html('密码可由大小写英文字母、数字组成，长度6－16个字符。');
}else{
	$("#pwdHint").html('<img class="pw-save" src="/images/reg/pw_safe_'+imgName+'.gif" alt="" width="115" height="35">');
	$("#pwdHint").removeAttr('class');
}
}